#include <aer.hpp>


class SuspendedDustApp : public aer::Application
{
  private:
    static const aer::U32 kNumParticles = 20000;
    
  private:
    aer::FreeCamera *m_camera;    
    
    aer::Mesh m_mesh;//
    
    aer::DeviceBuffer m_buffer[2];
    GLuint m_tf[2];
    aer::U8 m_srcBufferId;
    aer::U8 m_dstBufferId;
    bool m_isFirst;
    
    aer::Texture m_texture;
    aer::Program m_renderPgm;    
    aer::Program m_updatePgm;
    
    
    
  public:
    SuspendedDustApp() 
      : m_camera(NULLPTR)
    {}
    
    ~SuspendedDustApp()
    {
      AER_SAFE_DELETE( m_camera );
    }
    
    
    void updateFrame();
    void drawFrame();
      
  
  private:
    void init();
    void initGeometry();
    void initTexture();
    void initShader();
};
